
package com.bc66.tiger.test.project.dao.impl;


import com.bc66.tiger.framework.base.BaseIbatis3Dao;
import com.bc66.tiger.framework.page.Page;
import com.bc66.tiger.framework.page.PageRequest;
import com.bc66.tiger.test.project.dao.IUserInfoDao;
import com.bc66.tiger.test.project.model.UserInfo;

public class UserInfoDaoImpl extends BaseIbatis3Dao<UserInfo,java.lang.Long> implements IUserInfoDao{

	public Class getEntityClass() {
		return UserInfo.class;
	}
	
	public void saveOrUpdate(UserInfo entity) {
		if(entity.getUserId() == null) 
			save(entity);
		else 
			update(entity);
	}
	
	public Page findByPageRequest(PageRequest pageRequest) {
		return pageQuery(getMapperPath() + ".pageSelect",pageRequest);
	}
	

}
